Mastering iOS Frameworks: Beyond the Basics, 2e (Developer's Library) by Kyle Richter & Joe Keeley

Mastering iOS Frameworks: Beyond the Basics, 2e (Developer's Library) by Kyle Richter & Joe Keeley

Author:Kyle Richter & Joe Keeley [Richter, Kyle]
Language: eng
Format: azw3
Publisher: Addison-Wesley Professional
Published: 2015-04-26T16:00:00+00:00


Click here to view code image

if (![UIPrintInteractionController isPrintingAvailable])

{

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"This device does not support printing!" delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];

[alert show];

}

* * *

Note

AirPrint is defined as part of UIKit so there are no additional headers or frameworks that need to be imported.

* * *

Printing Text

Printing text is probably the most common use case for not just AirPrint but any kind of print job. Using AirPrint to print text can be complex if you aren’t familiar with printing terminology. The following code is from the ICFFirstViewController.m class of the sample app. Look at it as a whole first; later in this section, it will be broken down by each line and discussed.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.